import request from '@utils/request'

//绩效类别
export const classicGetList = (data) => {
    return request.get(`/api/performance/class/performanceClassList?page=${data.pageNo}&pagesize=${data.pageSize}`)
}
export const classicAdd = (data) => {
    return request.post(`/api/performance/class/addPerformanceClass`, data)
}
export const classicEdit = (data) => {
    return request.post(`/api/performance/class/savePerformanceClass`, data)
}
export const classDel = (data) => {
    return request.get(`/api/performance/class/delPerformanceClass?id=${data}`)
}

//考核项管理
export const contentGetList = (data) => {
    return request.get(`/api/performance/content/performanceContentList?page=${data.pageNo}&pagesize=${data.pageSize}`)
}
export const contentAdd = (data) => {
    return request.post(`/api/performance/content/addPerformanceContent`, data)
}
export const contentEdit = (data) => {
    return request.post(`/api/performance/content/savePerformanceContent`, data)
}
export const contentDel = (data) => {
    return request.get(`/api/performance/content/delPerformanceContent?id=${data}`)
}

//考核点管理
export const spotGetList = (data) => {
    return request.get(`/api/performance/spot/performanceSpotList?pid=${data.pid}&page=${data.pageNo}&pagesize=${data.pageSize}`)
}
export const spotAdd = (data) => {
    return request.post(`/api/performance/spot/addPerformanceSpot`, data)
}
export const spotEdit = (data) => {
    return request.post(`/api/performance/spot/savePerformanceSpot`, data)
}
export const spotDel = (data) => {
    return request.get(`/api/performance/spot/delPerformanceSpot?id=${data}`)
}

export default {
    classicGetList, classicAdd, classicEdit, classDel,
    contentGetList, contentAdd, contentEdit, contentDel,
    spotGetList, spotAdd, spotEdit, spotDel
}